﻿#pragma once

#include "Object/Object.h"
#include "EditorNotificationView.m.h"

class REditorNotificationViewModel;
class REditorNotificationItemView;
class RVerticalPositionerWidget;
class RWidget;

RCLASS()
class REditorNotificationView : public RObject
{
    ROBJECT

public:
    void BindViewModel(TSharedObjectPtr<REditorNotificationViewModel> InViewModel);

    void FillWidgets(TSharedObjectPtr<RWidget> InParentWidget);
protected:
    TWeakObjectPtr<REditorNotificationViewModel> ViewModel;

    TWeakObjectPtr<RVerticalPositionerWidget> ItemsParentWidget;

    TVector<TSharedObjectPtr<REditorNotificationItemView>> ItemViews;
    
    //更新通知项对象
    void UpdateItemViews();
    //更新通知项控件
    void UpdateItemWidgets();
};